//
//  SuggestTableViewCell.m
//  Alltelevisionnews
//
//  Created by dllo on 15/11/27.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "SuggestTableViewCell.h"

#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation SuggestTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self create];
    }
    
    return self;
    
}


- (void)create {
    
    self.titleLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.titleLabel];
    self.titleLabel.layer.borderWidth = 1;
    
    self.photoImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.photoImageView];
    self.photoImageView.layer.borderWidth = 1;
    
}


- (void)layoutSubviews {
    
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(WIDTH / 4 - 5 * WIDTH / 375, 5 * HEIGHT / 44, WIDTH / 3 * 2 - 20 * WIDTH / 375, HEIGHT - 10 * HEIGHT / 44);
    
    self.photoImageView.frame = CGRectMake(10 * WIDTH / 375, 5 * HEIGHT / 44, WIDTH / 4 - 25 * WIDTH / 375, HEIGHT - 10 * HEIGHT / 44);
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
